#ifndef SQLCIPHER_H
#define SQLCIPHER_H

//#include <QtSql>
#include <QDebug>

typedef struct __sqlcipher_t sqlcipher_t;

class SQLCipher : public QObject
{
    Q_OBJECT
public:
    explicit SQLCipher(QObject *parent = nullptr);
    ~SQLCipher();

    bool open(QString fileName);
    bool open(const char *fileName);
    bool close();

    bool isOpen();

    bool setKey(QString key);
    bool setKey(const char *key);

    bool exec(QString cmd);
    bool exec(const char *cmd);

    void appendData(QString value);

    QString getData();

private:
    sqlcipher_t *sql;
    QString data;



signals:
//    static void finished(bool);

};

#endif // SQLCIPHER_H
